package com.qf.smsplatform.dto;
/*2021/10/26*/

import com.qf.smsplatform.pojo.CheckNull;
import com.qf.smsplatform.pojo.CheckType;
import org.springframework.util.ObjectUtils;

/**
 * @YuTao
 */

public class UserDto implements CheckNull  {
    private String password;
    private String usercode;

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUsercode() {
        return usercode;
    }

    public void setUsercode(String usercode) {
        this.usercode = usercode;
    }

    @Override
    public boolean isNull(CheckType type) {//将判断放在user实体类中进行判断，是否为空，是否符合长度
        if(ObjectUtils.isEmpty(password)||ObjectUtils.isEmpty(usercode)||password.length()<8||usercode.length()<5){
            return true;
        }
        return false;
    }
}
